import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class PromptAction {
  // 默认的提示
  static showToast(String msg){
    Fluttertoast.showToast(
      msg: msg,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color.fromRGBO(33,150,243,1),
      textColor: Colors.white,
      webBgColor: '#0680d7',
      webPosition: 'center',
    );
  }

  // 成功的提示
 static showSuccessToast(String msg){
    Fluttertoast.showToast(
      msg: msg,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color.fromRGBO(33,150,243,1),
      textColor: Colors.white,
      webBgColor: '#1bd66c',
      webPosition: 'center',
    );
  }

  // 失败的提示
  static showFailToast(String msg){
    Fluttertoast.showToast(
      msg: msg,
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      backgroundColor: const Color.fromRGBO(33,150,243,1),
      textColor: Colors.white,
      webBgColor: '#ff0000',
      webPosition: 'center',
    );
  }
}